﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderMovement.aspx.cs"
    Inherits="WMS6.Web.Inventory.OrderMovement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>OrderMovement</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
 
    <script src="../Js/jquery.blockUI.js" type="text/javascript"></script>
 
    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }

        function newOrderMovement()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "OrderMovement.aspx?from=" + escape(from);
            return false;
        }
        
        //弹出窗口选择货主
        function selectOwner()
        {
            var rtnValue = popModalWindow('../Configuration/OwnerQuery.aspx?action=txtOwnerID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtOwnerID").focus();
                document.getElementById("txtOwnerID").value = rtnValue;
            }
        }
                
        function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}
			
       function hiddenDiv()
		{
			var flag = document.getElementById("hiddenFlag").value
			if(flag == "1")
			{
				document.getElementById("actionDiv").style.display = "block";
				document.getElementById("hiddenFlag").value = '0';
			}
			else 
			{
				document.getElementById("actionDiv").style.display = "none";
			}
		}

		//显示 报表 DIV
		function showReport() 
		{
		    var pos = getElementPos("htmlbtnReport");
		    document.getElementById("reportDiv").style.top = pos.y + 17;
		    document.getElementById("reportDiv").style.left = pos.x;
		    document.getElementById("hiddenReportFlag").value = '1';
		}

		//隐藏 报表 DIV
		function hiddenReportDiv() 
		{
		    var flag = document.getElementById("hiddenReportFlag").value
		    if (flag == "1") {
		        document.getElementById("reportDiv").style.display = "block";
		        document.getElementById("hiddenReportFlag").value = '0';
		    }
		    else {
		        document.getElementById("reportDiv").style.display = "none";
		    }
		}

		//弹出 打印 采购订单 的窗口
		function popPrintOrderMovement() 
		{
		    var movementID = document.getElementById("txtMovmentID").value;
		    var OwnerID= document.getElementById("txtOwnerID").value;
		    window.open('../Common/PrintReport.aspx?rtype=printOrderMovement&movementID=' + escape(movementID)+'&OwnerID='+escape(OwnerID), 'PrintWindow', 'width=860,height=610,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no,status=no');
		}
		
		//锁屏
		function blockScreen() {
		    //锁屏
		    $.blockUI.defaults.message = GetBlockUIMsg();
		    $.blockUI.defaults.overlayCSS.backgroundColor = GetBlockUIBgColor();
		    $.blockUI();
		}
		
		//数据导入
		function DataImport() {
		    var rtnValue = popModalWindow('../Common/ImporData.aspx?action=MOVEMENTDETAIL&OrderID=' + escape(document.getElementById('hdnMovementID').value) + '&OwnerID=' + escape(document.getElementById('txtOwnerID').value), 'dialogWidth=520px;dialogHeight=300px;center=yes;resizable=yes;status=no;')
		   if(rtnValue != "") {
		       window.location.href = "OrderMovement.aspx?from=list&ID=" + escape(document.getElementById('hdnMovementID').value) + "&detail=3";
		   }
		}
    </script>

</head>
<body>
    <form id="F5221" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOrderMovement" runat="server" CssClass="label_header" Text="按单移动"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            CausesValidation="False" OnClick="btnGoBack_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnNew%>"
                            AccessKey="n" OnClientClick="newOrderMovement();return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnSave%>"
                            AccessKey="s" OnClick="btnSave_Click" />
                    </td>               
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnDelete%>"
                            AccessKey="d" OnClientClick="javascript:if(confirm('确定要删除选中的记录吗?'))return true; else return false;"
                            OnClick="btnDelete_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnCopy" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnCopy%>"
                            AccessKey="c" OnClick="btnCopy_Click" />
                    </td>
             
                      <td><input id="btnAction" type="button" runat="server" value="<%$Resources:ButtonResource,btnAction%>" class="button"  onclick="showAction();" /></td>   
                    
                    <td><input id="htmlbtnReport" type="button" runat="server" value="<%$Resources:ButtonResource,btnReport%>" class="button"  onclick="showReport();" /></td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,3)"
                        id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">基本信息</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,3);"
                        id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server">自定义字段</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL3">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',3,3);"
                        id="divM3">
                        <asp:Label ID="one3" CssClass="navigationlabel" runat="server" meta:resourcekey="one3">移动明细</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR3">
                        </div>
                    </div>
                </div>
                <div id="div_content">
                    <div id="con_one_1" style="display:block;">
                        <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblMovmentID" CssClass="label" runat="server" Text="移动单号"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblMovementType" CssClass="label" runat="server" Text="移动类型"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态"></asp:Label>
                                </td>
                                <td width="180px">
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtMovmentID" runat="server" CssClass="textbox" MaxLength="20"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:DropDownList ID="ddlMovementType" runat="server" CssClass="mediumselectbox"
                                        >
                                    </asp:DropDownList>
                                </td>
                                <td width="180px">
                                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" Enabled="False"  >
                                    </asp:DropDownList>
                                </td>
                                <td width="180px">
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主代码" ></asp:Label><font
                                        class="must_input">*</font>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblReasonCode" runat="server" CssClass="label" Text="移动原因" ></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblMovementDate" runat="server" CssClass="label" Text="移动日期" ></asp:Label>
                                </td>
                                <td width="180px">
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" meta:resourcekey="txtOwnerID"></asp:TextBox><img
                                        src="../Images/icon_find.gif" id="imgOwnerID" runat="server" alt="select one item"
                                        class="img" onclick="selectOwner();" />
                                </td>
                                <td width="180px">
                                    <asp:DropDownList ID="ddlReasonCode" runat="server" CssClass="mediumselectbox">
                                    </asp:DropDownList>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtMovementDate" runat="server" CssClass="textbox" onblur="Javascript:dataVer._IsTime(this,'lblMsg')"></asp:TextBox><img
                                        src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtMovementDate)" />
                                </td>
                                <td width="180px">
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none;">
                        <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblUdf1" runat="server" CssClass="label" Text="自定义字段01" meta:resourcekey="lblUdf1"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblUdf6" runat="server" CssClass="label" Text="自定义字段06" meta:resourcekey="lblUdf6"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblCreatedBy" runat="server" CssClass="label" Text="制单人" meta:resourcekey="lblCreatedBy"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblCreatedDate" runat="server" CssClass="label" Text="制单日期" meta:resourcekey="lblCreatedDate"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf1" runat="server" CssClass="textbox" meta:resourcekey="txtUdf1"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf6" runat="server" CssClass="textbox" meta:resourcekey="txtUdf6"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtCreatedBy" runat="server" Enabled="False" CssClass="textbox"
                                        meta:resourcekey="txtCreatedBy"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtCreatedDate" runat="server" Enabled="False" CssClass="textbox"
                                        meta:resourcekey="txtCreatedDate"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblUdf2" runat="server" CssClass="label" Text="自定义字段02" meta:resourcekey="lblUdf2"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblUdf7" runat="server" CssClass="label" Text="自定义字段07" meta:resourcekey="lblUdf7"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblApprovedBy" runat="server" CssClass="label" Text="确认人"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblApprovedDate" runat="server" CssClass="label" Text="确认时间"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf2" runat="server" CssClass="textbox" meta:resourcekey="txtUdf2"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf7" runat="server" CssClass="textbox" meta:resourcekey="txtUdf7"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtApprovedBy" runat="server" CssClass="textbox" Enabled="false"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtApproveDate" runat="server" CssClass="textbox" Enabled="false"
                                        meta:resourcekey="txtUdf7"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblUdf3" runat="server" CssClass="label" Text="自定义字段03" meta:resourcekey="lblUdf3"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblUdf8" runat="server" CssClass="label" Text="自定义字段08" meta:resourcekey="lblUdf8"></asp:Label>
                                </td>
                                <td width="360px" colspan="2">
                                    <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblRemark"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf3" runat="server" CssClass="textbox" meta:resourcekey="txtUdf3"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf8" runat="server" CssClass="textbox" meta:resourcekey="txtUdf8"></asp:TextBox>
                                </td>
                                <td width="360px" colspan="2" rowspan="3">
                                    <asp:TextBox ID="txtRemark" runat="server" CssClass="largetextarea" TextMode="MultiLine"
                                        meta:resourcekey="txtRemark"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblUdf04" runat="server" CssClass="label" Text="自定义字段04" meta:resourcekey="lblUdf04"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblUdf09" runat="server" CssClass="label" Text="自定义字段09" meta:resourcekey="lblUdf09"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf4" runat="server" CssClass="textbox" meta:resourcekey="txtUdf4"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf9" runat="server" CssClass="textbox" meta:resourcekey="txtUdf9"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:Label ID="lblUdf5" runat="server" CssClass="label" Text="自定义字段05" meta:resourcekey="lblUdf5"></asp:Label>
                                </td>
                                <td width="180px">
                                    <asp:Label ID="lblUdf10" runat="server" CssClass="label" Text="自定义字段10" ></asp:Label>
                                </td>
                                <td width="180px">
                                    &nbsp;
                                </td>
                                <td width="180px">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf5" runat="server" CssClass="textbox" meta:resourcekey="txtUdf5"></asp:TextBox>
                                </td>
                                <td width="180px">
                                    <asp:TextBox ID="txtUdf10" runat="server" CssClass="textbox" meta:resourcekey="txtUdf10"></asp:TextBox><img
                                        src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtUdf10)" />
                                </td>
                                <td width="180px">
                                    &nbsp;
                                </td>
                                <td width="180px">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td colspan="4">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_3" style="display:none; overflow-x: auto; overflow-y: hidden;">
                        <table width="3200px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAddDetail" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnAddDetail%>"
                                                    OnClientClick="javascript:if(document.getElementById('hdnMovementID').value == ''){ if(confirm('按单移动主信息尚未保存,是否继续,继续则自动保存主信息.')) return true; else return false;}"
                                                    OnClick="btnAddDetail_Click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnDeleteDetail" runat="server" CssClass="button" Enabled="False"
                                                    Text="<%$Resources:ButtonResource,btnDeleteDetail%>" OnClientClick="javascript:if(confirm('确定要删除选中的记录吗?')) return true; else return false;"
                                                    OnClick="btnDeleteDetail_Click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnImportData" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnImportData%>"
                                                OnClientClick="javascript:if(document.getElementById('hdnMovementID').value == ''){ if(confirm('请先保存按单移动单据!')) return true; else return false; }" 
                                                OnClick="btnImportData_Click"   />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvMovementDetail" runat="server" AllowSorting="True" AutoGenerateColumns="false"
                                            AllowPaging="True" OnPageIndexChanging="gvMovementDetail_PageIndexChanging" CssClass="gridview" oninit="gvMovementDetail_Init"
                                            DataKeyNames="MovementID,LineID,Status,HoldStatus,FromLoc,FromLpnID,OwnerID,SkuID,Lot,ToLoc,ToLpnID,PackID,UomID,Qty" Width="3200px" OnRowDataBound="gvMovementDetail_RowDataBound"
                                            OnSorting="gvMovementDetail_Sorting" meta:resourcekey="gvMovementDetail">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:TemplateField meta:resourcekey="TemplateField">
                                                    <HeaderTemplate>
                                                        <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('5221','gvMovementDetail');" onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvMovementDetail');"
                                                            meta:resourcekey="CheckBox1" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvMovementDetail');"
                                                            meta:resourcekey="CheckBox2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:TemplateField HeaderText="明细" FooterText="明细" meta:resourcekey="TemplateFieldResource2">
                                                    <ItemTemplate>
                                                        <a id="receiptA" runat="server" href='<%# FormatUrl("OrderMovementDetail.aspx?from={0}&ID={1}&LineID={2}&owner={3}&type=Edit",this.hdnFrom.Value,Eval("MovementID").ToString(),Eval("LineID").ToString(),Eval("OwnerID").ToString()) %>'
                                                            target="_self">
                                                            <img src="../Images/icon_edit.gif" class="img" style="border: none 0px blue;" alt="receipt" /></a>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_50" HorizontalAlign="Center" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="LineID" HeaderText="行号" FooterText="行号" SortExpression="LineID"
                                                  >
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="OwnerID" HeaderText="货主代码" FooterText="货主代码" SortExpression="OwnerID"
                                                    meta:resourcekey="OwnerID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="SkuID" HeaderText="货品代码" FooterText="货品代码" SortExpression="SkuID"
                                                    meta:resourcekey="SkuID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="FromLoc" HeaderText="货位" FooterText="货位" SortExpression="FromLoc"
                                                    meta:resourcekey="ToLoc">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Lot" HeaderText="批号" FooterText="批号" SortExpression="Lot"
                                                  >
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                      <asp:BoundField DataField="FromLpnID" HeaderText="LPN" FooterText="LPN" SortExpression="FromLpnID"
                                                    meta:resourcekey="ToLoc">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                  <asp:TemplateField FooterText="订单数量" HeaderText="订单数量" SortExpression="FromQty" >
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblFromQty" runat="server" Text='<%# GetPreferenceDigit(Eval("FromQty").ToString()) %>'
                                                           ></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                    <asp:TemplateField FooterText="库存数量" HeaderText="库存数量" SortExpression="AVAILABLEQTY">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblAvailableQty" runat="server" Text='<%# GetPreferenceDigit(Eval("AVAILABLEQTY").ToString()) %>'
                                                            meta:resourcekey="lblAvailableQty"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                   <asp:BoundField DataField="ToLpnID" HeaderText="至LPN" FooterText="至LPN" SortExpression="ToLpnID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                  <asp:BoundField DataField="ToLoc" HeaderText="至货位" FooterText="至货位" SortExpression="ToLoc"
                                                    meta:resourcekey="ToLoc">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                   <asp:TemplateField FooterText="移动数量" HeaderText="移动数量" SortExpression="Qty"
                                                    meta:resourcekey="Qty">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblQty" runat="server" Text='<%# GetPreferenceDigit(Eval("Qty").ToString()) %>'
                                                          ></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                  <asp:BoundField DataField="PackID" HeaderText="包装" FooterText="包装" SortExpression="PackID"
                                                    meta:resourcekey="PackID">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="UomID" HeaderText="单位" FooterText="单位" SortExpression="UomID"
                                                    meta:resourcekey="UomID">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="SkuDescr"
                                                    meta:resourcekey="SkuDescr">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSkuDescr" runat="server" Text='<%# Eval("SkuDescr").ToString() %>'
                                                            meta:resourcekey="lblSkuDescr"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                                </asp:TemplateField>
                                                  <asp:TemplateField FooterText="分配数量" HeaderText="分配数量" SortExpression="ALLOCATEDQTY" >
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblAllocatedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("ALLOCATEDQTY").ToString()) %>' ></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>                                               
                                                <asp:BoundField DataField="StatusD" HeaderText="状态" FooterText="状态" SortExpression="StatusD" >
                                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                                </asp:BoundField>
                                                  <asp:BoundField DataField="VendorID" HeaderText="供应商代码" FooterText="供应商代码" SortExpression="VendorID"
                                                    meta:resourcekey="VendorID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                  <asp:BoundField DataField="ExternalLot" HeaderText="外部批号" FooterText="外部批号" SortExpression="ExternalLot"
                                                    meta:resourcekey="VendorID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>                                            
                                                 <asp:TemplateField FooterText="生产日期" HeaderText="生产日期" SortExpression="ProduceDate"
                                                    meta:resourcekey="ProduceDate">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblProduceDate" runat="server" Text='<%# GetPreferenceShortDate(Eval("ProduceDate").ToString()) %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                 <asp:TemplateField FooterText="失效日期" HeaderText="失效日期" SortExpression="ExpiryDate"
                                                    meta:resourcekey="ExpiryDate">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblExpiryDate" runat="server" Text='<%# GetPreferenceShortDate(Eval("ExpiryDate").ToString()) %>' ></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:TemplateField FooterText="收货日期" HeaderText="收货日期" SortExpression="ReceiptDate"
                                                    meta:resourcekey="ReceiptDate">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblReceiptDate" runat="server" Text='<%# GetPreferenceShortDate(Eval("ReceiptDate").ToString()) %>' ></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                 <asp:BoundField DataField="LotAttr01" HeaderText="批次属性01" FooterText="批次属性01" SortExpression="LotAttr01"
                                                    meta:resourcekey="LotAttr01">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr02" HeaderText="批次属性02" FooterText="批次属性02" SortExpression="LotAttr02"
                                                    meta:resourcekey="LotAttr02">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr03" HeaderText="批次属性03" FooterText="批次属性03" SortExpression="LotAttr03"
                                                    meta:resourcekey="LotAttr03">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr04" HeaderText="批次属性04" FooterText="批次属性04" SortExpression="LotAttr04"
                                                    meta:resourcekey="LotAttr04">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr05" HeaderText="批次属性05" FooterText="批次属性05" SortExpression="LotAttr05"
                                                    meta:resourcekey="LotAttr05">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr06" HeaderText="批次属性06" FooterText="批次属性06" SortExpression="LotAttr06"
                                                    meta:resourcekey="LotAttr06">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr07" HeaderText="批次属性07" FooterText="批次属性07" SortExpression="LotAttr07"
                                                    meta:resourcekey="LotAttr07">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr08" HeaderText="批次属性08" FooterText="批次属性08" SortExpression="LotAttr08"
                                                    meta:resourcekey="LotAttr08">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr09" HeaderText="批次属性09" FooterText="批次属性09" SortExpression="LotAttr09"
                                                    meta:resourcekey="LotAttr09">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                 <asp:BoundField DataField="LotAttr10" HeaderText="POD" FooterText="批次属性10" SortExpression="LotAttr10"
                                                    meta:resourcekey="LotAttr10">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Remark" HeaderText="备注" FooterText="备注" SortExpression="Remark" >
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;
                    border: none 0 black">
                    <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
                        <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                            <td class="line" id="tdlnkbtnPodSave" runat="server"  visible="false" >
                                <asp:LinkButton ID="lnkbtnPodSave" runat="server" Text="更新自定义字段"
                                    OnClientClick="blockScreen();" OnClick="lnkbtnPodSave_Click"  ></asp:LinkButton>
                            </td>
                        </tr>
                         <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                            <td class="line" id="tdlkbAllocate" runat="server"  visible="false" >
                                <asp:LinkButton ID="lkbAllocate" runat="server" Text="<%$Resources:ButtonResource,btnAllocate%>"
                                    OnClientClick="blockScreen();" OnClick="lkbAllocate_Click"  ></asp:LinkButton>
                            </td>
                        </tr>
                         <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                            <td class="line" id="tdlkbRevertAllocate" runat="server"  visible="false" >
                                <asp:LinkButton ID="lkbRevertAllocate" runat="server" Text="取消分配"
                                    OnClientClick="blockScreen();" OnClick="lkbRevertAllocate_Click"  ></asp:LinkButton>
                            </td>
                        </tr>
                         <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                            <td class="line" id="tdlkbConfirm" runat="server"  visible="false" >
                                <asp:LinkButton ID="lkbConfirm" runat="server" Text="<%$Resources:ButtonResource,btnConfirm%>"
                                    OnClientClick="blockScreen();" OnClick="lkbConfirm_Click"  ></asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </div> 
                <div id="reportDiv" style="background-color:#FFFFFF; position:absolute;display:none;">
                 <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu2">
                     <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                         <td class="line"  id="tdlnkbtnMovementOrder" runat="server"  visible="false" >
                             <asp:LinkButton ID="lnkbtnMovementOrder" runat="server"  Text="<%$Resources:ButtonResource,lnkbtnPrintMovement%>" OnClientClick="popPrintOrderMovement();"  ></asp:LinkButton>
                         </td>
                     </tr>
                 </table>
                </div>
                <input type="hidden" id="hiddenFlag" />
                <input type="hidden" id="hdnLineID" runat="server" />
                <input id="hdnMovementID" runat="server" type="hidden" />
                <input id="hdnFlag" runat="server" type="hidden" value="0" />
                <input id="hdnType" runat="server" type="hidden" />
                <input id="hdnCopy" runat="server" type="hidden" />
                <input id="hiddenReportFlag" type="hidden" />  
            </ContentTemplate>         
        </asp:UpdatePanel>
        <input type="hidden" id="hdnFrom" runat="server" />
        <input type="hidden" id="hdnDataFormat" runat="server" />
        <input type="hidden" id="hdncalendarFlag" runat="server" />
    </div>
    </form>
</body>
</html>

<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
			hiddenDiv();
			hiddenReportDiv();
		    hiddenCalendarDiv();
		//-->
</script>

